Skip to content

test: add benchmark on AWS Lambda #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 9, 2021
Merged

test: add benchmark on AWS Lambda #261

merged 7 commits into from
Feb 9, 2021

Conversation

nmoutschen
Copy link
Contributor

Issue #, if available: None

Description of changes:

Add a benchmark that deploys Lambda functions with/without Lambda Powertools to measure the performance impact of using it.

Checklist

Breaking change checklist

None

RFC issue #: None

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nmoutschen nmoutschen marked this pull request as draft January 13, 2021 11:43
@nmoutschen nmoutschen changed the title [WIP] tests: add benchmark on AWS Lambda [WIP] test: add benchmark on AWS Lambda Jan 13, 2021
@codecov-io
Copy link

codecov-io commented Jan 13, 2021

Codecov Report

Merging #261 (84555a1) into develop (1131541) will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #261      +/-   ##
===========================================
- Coverage    99.81%   99.75%   -0.07%     
===========================================
  Files           76       79       +3     
  Lines         2763     2839      +76     
  Branches       113      118       +5     
===========================================
+ Hits          2758     2832      +74     
- Misses           4        5       +1     
- Partials         1        2       +1     
Impacted Files Coverage Δ
aws_lambda_powertools/metrics/base.py 100.00% <0.00%> (ø)
aws_lambda_powertools/logging/logger.py 100.00% <0.00%> (ø)
aws_lambda_powertools/tracing/tracer.py 100.00% <0.00%> (ø)
aws_lambda_powertools/logging/formatter.py 100.00% <0.00%> (ø)
...ws_lambda_powertools/middleware_factory/factory.py 100.00% <0.00%> (ø)
...s_lambda_powertools/utilities/parser/models/sns.py 100.00% <0.00%> (ø)
...lambda_powertools/utilities/parameters/__init__.py 100.00% <0.00%> (ø)
...ambda_powertools/utilities/parser/envelopes/sns.py 100.00% <0.00%> (ø)
aws_lambda_powertools/shared/functions.py 100.00% <0.00%> (ø)
aws_lambda_powertools/shared/constants.py 100.00% <0.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1131541...84555a1. Read the comment docs.

Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!! Only two remarks (Memory, Readme), and a minor (comment on sleep 150)

@heitorlessa
Copy link
Contributor

Haha I glanced too quickly at them then

@nmoutschen nmoutschen changed the title [WIP] test: add benchmark on AWS Lambda test: add benchmark on AWS Lambda Jan 17, 2021
@nmoutschen nmoutschen marked this pull request as ready for review January 18, 2021 09:01
@michaelbrewer
Copy link
Contributor

@heitorlessa You might want to set a baseline and publish results between each release to track regressions. Either as a simple json file or something funky like this: https://simonwillison.net/2020/Oct/9/git-scraping/

@nmoutschen
Copy link
Contributor Author

Before we merge this, open question:

Right now, this depends on sam deploy --guided which require user inputs. Should I create an S3 bucket for deployment artefacts (similar to what I did here) so that this can be fully automated?

@heitorlessa
Copy link
Contributor

heitorlessa commented Jan 20, 2021 via email

@nmoutschen
Copy link
Contributor Author

Create a bucket under Powertools account - this will get us closer to automate and check for regressions

For the generic case, that means just checking for an environment variable and letting other users manage it?

@heitorlessa
Copy link
Contributor

heitorlessa commented Jan 20, 2021 via email

@to-mc to-mc added the feature New feature or functionality label Jan 26, 2021
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some tiny adjustments to ensure people are aware this runs on Unix based systems only, it can incur charges, and how long the script waits for data to propagate from CWL to CWLI

Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot again @nmoutschen - Merging this now.

@heitorlessa heitorlessa merged commit 7b23b5b into aws-powertools:develop Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants